<template>
	<uni-data-picker :clear-icon="false" :readonly="true"
		:localdata="dataTree" :value="[orderInfo.industry_type_one, orderInfo.industry_type_tow]">
	</uni-data-picker>
</template>

<script>
	export default {
		props: {
			orderInfo: {
				type: Object,
				value: null
			}
		},
		data() {
			return {
				dataTree: [],
			}
		},
		created(e) {
			this.getShoppingCateListAll();
		},
		methods: {
			async getShoppingCateListAll() {
				const {
					data
				} = await this.$api.get('ShoppingCateListAll', {
					type: 10
				});
				this.dataTree = this.setMapList(data.list);
			},
			setMapList(list = []) {
				list.forEach((item) => {
					item.text = item.title;
					item.value = item.id;
					if (item.child && item.child.length > 0) {
						item.children = this.setMapList(item.child);
					}
				})
				return list;
			},
		}
	}
</script>

<style>
	.input-value-border {
		border: 0rpx !important;
		padding: 0rpx !important;
		font-size: 28rpx !important;
	}

	.placeholder {
		font-size: 28rpx !important;
	}
	
	.uni-data-tree .text-color {
		color: #000 !important;
	}
</style>